package com.huifaapp.mall.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;


import com.huifaapp.mall.activity.tmall_teamoneFragment;
import com.huifaapp.mall.activity.tmall_teamtwoFragnet;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by duanyu on 2018/1/5.
 */

public class tmall_teamoneAdapter  extends FragmentPagerAdapter{
    private List<String>Teamlist;

    public tmall_teamoneAdapter(FragmentManager fm, List<String> teamlist) {
        super(fm);
        Teamlist = teamlist;
    }

    @Override
    public Fragment getItem(int position) {
        tmall_teamoneFragment tmall_teamoneFragment=new tmall_teamoneFragment();
        tmall_teamtwoFragnet tmall_teamtwoFragnet=new tmall_teamtwoFragnet();
        List<Fragment>fragmentList=new ArrayList<>();
        fragmentList.add(tmall_teamoneFragment);
        fragmentList.add(tmall_teamtwoFragnet);
        return fragmentList.get(position);
    }

    @Override
    public int getCount() {
        return Teamlist.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return Teamlist.get(position);
    }
}
